<?php
// 定义Dto实体类
class BlogDto
{
    //dto属性都要共有的，entity
    private $id;
    private $title;
    private $summary;
    private $releaseDate;
    private $clickHit;
    private $replyHit;
    private $content;
    private $typeId;
    private $keyWord;




    // 构造函数，传入数组并赋值
    public function __construct(array $data) {
        foreach ($data as $key => $value) {
            if (property_exists($this, $key)) {
                $this->$key = $value;
            }
        }
    }

}












